-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Work-In-Progress: Integrated Terminal ⚙ #14664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
I also was thinking about whether a |
all views are splittable: https://github.com/helix-editor/helix/blob/master/docs%2Farchitecture.md, so yeah it makes sense |
It makes sense to me, but a lot of the |
|
I have a genuine question. What are the benefits of integrating a terminal into Helix? When you can take advantage of the multiplexer that several terminals offer, or even tmux helix.mp4 |
That's a fine question. The main benefit for me is windows support. Zellij and tmux don't support windows (except in WSL). Also, having the terminal integrated allows us to do some cool stuff in the future like CTRL+Clicking a file link in an failed compilation to go to the file, line and col that the error references. |
7c48a01 to
f7cd3b4
Compare
029ec3f to
c17950f
Compare
|
I don't think this makes sense or is needed |
c17950f to
9080cc5
Compare
There has historically been an interest in this feature, as can be found here. I also have been interested in this feature for a while, so I decided to do some work to adapt the original PoC. |
|
I'd love to have "clickable" (by keyboard) file links! |
what do you think about making but I'm afraid this will touch a lot of code, so it's better as a separate PR because for example, plugins may one day want to support views that aren't attached to a document |
Also, some ideas on what to do about all the code that expects a view to always have a document would be nice. There are several macros that are used all around helix that would have to be updated. What's the cleanest way to decouple all this? cc: @the-mikedavis Also worth considering is a generic of some kind. I think the problem with traits is that if we don't redo the order of things (aka a document has a view, not the other way around), we end up with functions on the view that aren't usable without downcasting. |
9080cc5 to
df9ddca
Compare
|
I can vouch for the Windows support. I have been stuck on Windows due to a multitude of reasons, but an issue I kept facing is a toggleable terminal. Wezterm does handle most of my multiplexing needs, aside from a popup terminal, or a toggleable terminal. I will try to get this running on my fork maybe this week, I have way too much PRs merged there 😅 |
If you bring it in as-is, just a reminder you'll need to set the Also there are rendering glitches and stuff, but please don't hesitate to provide feedback! :) |
This commit separates some primitives from `helix-view` into their own crates, for later use by crates that view might depend on, without causing cyclic dependencies.
006eecc to
4002219
Compare
This commit adds the `helix-integrated-terminal` crate, which handles the PTY creation and view logic for an integrated terminal in Helix, using the `alacritty_terminal` crate. The terminal can be opened using the `:term` command, and the terminal can be exited by either using `exit` in the terminal itself, or by using `C-q` twice. The current implementation is as a pop-up, but in the future, we may be able to expose the terminal as a `View`, if work is done to decouple the `Document` attachment to `View`. Signed-off-by: Ryan Brue <[email protected]>
4002219 to
242ca5e
Compare

This PR is a work-in-progress! Give it a whirl if you feel adventurous ;)
Resolves: #1976
This PR was inspired by the discussion in the issue above.
Why an integrated terminal? Why not Tmux/Zellij/?
Progress so far:
Screencast_20251026_224808.webm
What's left to work on?
helix-integrated-terminalto use (so helix-view doesn't have a cyclic dependency onhelix-integrated-terminalView(hard)Feel free to contribute to the branch!